;--------------------------------------
;
; prog1-2.asm
;
; Demonstration of MASM 6.0 simplified 
; segment directives in large memory
; model
;
;

; defines here

DOS_DISPLAY_STRING      equ         09h

; Use small memory model

     .Model     large

; Create stack

     .Stack                         ; 1 K by default

; Declare data segment

     .Fardata

; message to be printed

hello     db     10,13,'Hello Chuck!',10,13,'$' 
          

; Begin code segment

     .Code

; Start program here

     .Startup

;--------------------------------------
;
; Main body of program here
; where DOS interrupt 21h function
; 09h is used to print the now-
; infamous "Hello CHuck!" message
; to the screen
;
     push    ds                     ; save ds register
     mov     ax,SEG hello           ; set ds register to
     mov     ds,ax                  ; far data segment of
     assume  ds:SEG hello           ; hello
     mov     dx,OFFSET hello        ; offset goes to dx
     mov     ah,DOS_DISPLAY_STRING  ; DOS function to display string
     int     21h                    ; DOS does printing
     pop     ds                     ; restore ds

; End program and return to DOS

     .Exit

; End of ASSEMBLY source file

     END

;
;--------------------------------------
